import { Menu } from "../entity/Menu";
import { Item } from "../entity/Item";

export class AppGlobal {
    public static user: any;
    public static REQUEST_TIMEOUT = 5000;


    //得到当前用户的语言
    public static getLanguage() {
        if (this.user == null) {
            //用户未登录根据当前位置进行语言选择
            console.log("用户未登录根据当前位置进行语言选择")
            return { "name": "中文", "value": "zh_CN" };
        }
        return this.user.language;
    }
    /**
     * 得到用户菜单
     * [静态菜单]
     */
    public static getMenus() {
        let menus = new Array();
        for (let i = 0; i < 6; i++) {
            menus.push(new Menu());
        }
        return menus;
    }
    /**
     * 得到服务器地址
     */
    public static getServe() {
        return "http://192.168.0.109:8080/";
    }

    /**
     * 得到token
     */
    public static getToken() {
        return "this is a vurtual token ,better for none"
    }


}